﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Security;
using System.Collections;
using Webchatting.Common;
using Webchatting.Dal;

public partial class server_MyGroup : System.Web.UI.Page
{
    public static ArrayList arrGroupIds = new ArrayList();
    public static ArrayList arrGroupNames = new ArrayList();
    public static ArrayList arrGroupOwners = new ArrayList();
    public static ArrayList arrGroupDess = new ArrayList();
    protected void Page_Load(object sender, EventArgs e)
    {

    }

    protected void btnListMyGroup_Click(object sender, EventArgs e)
    {
        OperationGroup OGroup = new OperationGroup();

        int selected = ddlSelectGroup.SelectedIndex;
        FormsIdentity id = (FormsIdentity)User.Identity;

        OperationGroup Ogroup = new OperationGroup();
        string serachFriends = Ogroup.LoadGroup(id.Ticket.UserData.Split('@')[0], arrGroupIds, arrGroupNames, arrGroupOwners, arrGroupDess);

        ltlResult.Text = "<b>c我的群：</b><br/>" + serachFriends;
        ltlText.Text = "<b>请选择要操作的群ID：</b>";

        ddlSelectGroup.Visible = true;
        
        if (id.Ticket.UserData.Split('@')[0] == arrGroupOwners[selected])
        {
            btnEditgroupRemark2.Visible = true;
            btnEditGroupdetails.Visible = true;
            btnManageGroupMum.Visible = true;
            btnDropGroup.Visible = true;
        }
        else 
        {
            btnEditgroupRemark.Visible = true;
            btnExitGroup.Visible = true;
        }
    }
    protected void btnEditgroupRemark_Click(object sender, EventArgs e)
    {

    }
   
}
